package com.ming.Bean;

/**
 * @Author:weiming
 * @Date:2020/11/15
 */

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * 在属性非常多的情况下，也可以定义一个和配置文件对应的Bean：
 */
@Component
@ConfigurationProperties(prefix = "zwm")
public class MyConfigBean {

    private String name;
    private String title;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }
}
